package com.example.demo.service.impl;

import com.example.demo.mapper.SysLogMapper;
import com.example.demo.entity.SysLog;
import com.example.demo.service.SysLogService;
import com.example.demo.utils.PageInfoNew;
import com.github.pagehelper.PageHelper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class SysLogServiceImpl implements SysLogService {

    @Resource
    SysLogMapper sysLogMapper;

    @Override
    public PageInfoNew<SysLog> findWithPage(int pageNum, int pageSize, String url,String code) {
        PageHelper.startPage(pageNum, pageSize);
        return new PageInfoNew<>(sysLogMapper.page(url,code));
    }
}
